import { useEffect } from "react";
// import { threeD } from "./3d";
import { twoD } from "./2d";

import "./index.scss";

import { useAgvStore } from "@/stores/useAgvStore";

const Map = () => {
	const { stationList, segmentList, areaList } = useAgvStore();
	useEffect(() => {
		twoD({ id: "map", options: { stationList, segmentList, areaList } });
	}, [stationList, segmentList, areaList]);

	return <canvas id="map" />;
};

export default Map;
